package yunc.checkData.pojo;


import yunc.checkData.utils.IOutil;

import java.util.ArrayList;
import java.util.List;

/**
 * 将标准格式数据转为业务数据格式
 */
public class T021 extends ZKFile {

    private TitleTide title;
    private Data021 data;
    private List<DescTide> desc=new ArrayList<>();
    public T021(String filePath){
        List<String> strings = IOutil.read(filePath);
        //初始化Title
        this.title=new TitleTide(strings.get(0));

        //初始化数据
        List<String> dataList = new ArrayList<>();
        for (int i = 1; i < strings.size()-1; i++) {
            dataList.add(strings.get(i));
        }
        this.data=new Data021(this.title,dataList);

        //初始化描述
        List<String> descList = new ArrayList<>();
        //System.out.println(strings.get(strings.size() - 1));
        this.desc.add(new DescTide(strings.get(strings.size()-1)));
    }

    public TitleTide getTitle() {
        return title;
    }

    public void setTitle(TitleTide title) {
        this.title = title;
    }

    public Data021 getData() {
        return data;
    }

    public void setData(Data021 data) {
        this.data = data;
    }

    public List<DescTide> getDesc() {
        return desc;
    }

    public void setDesc(List<DescTide> desc) {
        this.desc = desc;
    }
}
